import { pubRequire } from '@utils/public'
const baseUrl = '/partner/activity-config'
/*运营位配置列表*/
export function getActivityConfigList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callbBack, errBack)
}
/* 新增配置 */
export function addActivityConfig(obj, callbBack, errBack) {
  return pubRequire('post', `${baseUrl}`, obj, callbBack, errBack)
}
/* 配置详情 */
export function activityConfigDetail(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/${obj.id}`, '', callbBack, errBack)
}
/* 编辑配置 */
export function editActivityConfig(obj, callbBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${obj.id}`,
    obj.editInfo,
    callbBack,
    errBack
  )
}
/* 配置上架 */
export function activityConfigUpShelf(obj, callbBack, errBack) {
  return pubRequire(
    'patch',
    `${baseUrl}/up-shelf/${obj.id}`,
    '',
    callbBack,
    errBack
  )
}
/* 配置下架 */
export function activityConfigDownShelf(obj, callbBack, errBack) {
  return pubRequire(
    'patch',
    `${baseUrl}/down-shelf/${obj.id}`,
    '',
    callbBack,
    errBack
  )
}
/* 删除配置 */
export function deleteActivityConfig(obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${obj.id}`, '', callbBack, errBack)
}
